<?php
function username($userID)
{
$username = mysql_fetch_array(safe_query("SELECT username FROM user WHERE userID='".$userID."'"));
return $username['username'];
}
function category($catID)
{
$category = mysql_fetch_array(safe_query("SELECT name FROM category WHERE id='".$catID."'"));
return $category['name'];
}

function cut($headline, $max)
{
	if(mb_strlen($headline)>$max) {
		$headline=mb_substr($headline, 0, $max);
		$headline.='...';
	}
			return $headline;
}
?>